package com.jml.transaction.jdbc事务;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class UserRowMapper implements RowMapper<User> {

	@Override
	public User mapRow(ResultSet set, int index) throws SQLException {
		User user = new User(set.getInt("id"),set.getString("name"),set.getInt("age"),set.getString("sex"));
		return user;
	}
}
